<%@ page language="java" import="cn.com.wxd.common.VerCodeQQUtil" pageEncoding="utf-8"%>
<%
		response.setContentType("image/jpeg");  
        // 禁止图像缓存。  
        response.setHeader("Pragma", "no-cache");  
        response.setHeader("Cache-Control", "no-cache");  
        response.setDateHeader("Expires", 0);    
        //生成随机字串  
        String verifyCode = VerCodeQQUtil.generateVerifyCode(4);  
        //生成图片  
        int w = 100, h = 40;  
        VerCodeQQUtil.outputImage(w, h, response.getOutputStream(), verifyCode);
		//存入会话session
		session.removeAttribute("vercode");
        session.setAttribute("vercode", verifyCode.toLowerCase());
        session.setMaxInactiveInterval(1800);
%>
